<?php
include('../../config.php');
/**
 * Created by PhpStorm.
 * User: 明哲
 * Date: 2016/4/27
 * Time: 13:50
 */
    $name =  $_GET['name'];
    $type =  $_GET['type'];

if($name!=''&&type!=''){
    $current = date('Y-m-d',time());
    $rows=$mysql->query("insert into `product` values(null,'$name','$type','$current')");
    $id = mysql_insert_id();
    if($id){
        echo $id;
    }
}else{
    echo 0;
}
